from __init__ import *


@fetch
def create_collection_folder_test():
    return (
        requests.get(
            url=Apis.collection_create_collection_folder,
            params={
                "folderName" : "这是一个收藏夹"
            },
            headers={
                "token" : "dc8ba0c7-b217-47f8-87ff-e726c90ea2fd"
            }
        )
    )

@fetch
def add_game_to_collection():
    return (
        requests.get(
            url=Apis.collection_add_game_to_collection,
            params={
                "gameId" : "5",
                "collectionFolderId": "1"
            },
            headers={
                "token" : "dc8ba0c7-b217-47f8-87ff-e726c90ea2fd"
            }
        )
    )

@fetch
def del_game_in_collection():
    return (
        requests.get(
            url=Apis.collection_del_game_in_collection,
            params={
                "gameId": "4",
                "collectionFolderId" : "1"
            },
            headers={
                "token" : "dc8ba0c7-b217-47f8-87ff-e726c90ea2fd"
            }
        )
    )

@fetch
def load_all_collection_folder_test():
    return (
        requests.get(
            url=Apis.collection_load_all_collection_folder,
            params={
                "userId" : "ye54U3d6J1"
            },
            headers={
                    
                "token" : "dc8ba0c7-b217-47f8-87ff-e726c90ea2fd"
            }
        )
    )

@fetch
def del_collection_folder_test():
    return (
        requests.get(
            url=Apis.collection_del_collection_folder,
            params={
                "collectionFolderId": "2"
            },
            headers={
                "token" : "dc8ba0c7-b217-47f8-87ff-e726c90ea2fd"
            }
        )
    )

@fetch
def load_game_page_in_collection_test():
    return (
        requests.get(
            url=Apis.collection_load_game_page_in_collection,
            params={
                "collectionFolderId": "1"
            },
            headers={
                "token" : "dc8ba0c7-b217-47f8-87ff-e726c90ea2fd"
            }
        )
    )


@fetch
def load_game_page_in_collection_test():
    return (
        requests.get(
            url=Apis.collection_load_game_page_in_collection,
            params={
                "collectionFolderId": "1"
            },
            headers={
                "token" : "dc8ba0c7-b217-47f8-87ff-e726c90ea2fd"
            }
        )
    )

@fetch
def change_collection_folder_info():
    return (
        requests.get(
            url=Apis.collection_change_collection_folder_info,
            params={
                "collectionFolderId": "1",
                "permission": "0",
                "name": "我的我的"
            },
            headers={
                "token" : "dc8ba0c7-b217-47f8-87ff-e726c90ea2fd"
            }
        )
    )



if __name__ == "__main__":
    pprint(change_collection_folder_info())